home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / gamesmaster / includes / games / sound.i < prev   
Encoding:
Text File  |  1996-09-13  |  3.7 KB  |  164 lines

  1.     IFND GMS_SOUND_I
  2. GMS_SOUND_I  SET  1
  3.  
  4. **
  5. **    $VER: sound.i 0.3 (08.09.96)
  6. **    Includes Release xx.xx
  7. **
  8. **    games library sound structures
  9. **
  10. **    (C) Copyright 1996 DreamWorld Productions.
  11. **        All Rights Reserved
  12. **
  13.  
  14. * --- Sound stuff
  15.  
  16.    STRUCTURE    Sound,0
  17.     ULONG    SAM_Version           ;"SMV1"
  18.     ULONG    SAM_Stats             ;Reserved, do not touch.
  19.     UWORD    SAM_Channel           ;Channel (0-3)
  20.     WORD    SAM_Priority          ;Priority.
  21.     APTR    SAM_Header            ;Sample info header, if any.
  22.     APTR    SAM_Data              ;Address of sample data.
  23.     ULONG    SAM_Length            ;Length of sample data in WORDS.
  24.     UWORD    SAM_Octave            ;Octave/Note setting.
  25.     UWORD    SAM_Volume            ;Volume of sample (1 - 100).
  26.     ULONG    SAM_Attrib            ;Sound attributes.
  27.     APTR    SAM_File              ;Where the sound comes from.
  28.     LABEL    SAM_SIZEOF
  29.  
  30. CHAN_FREE =    0                     ;For Check_Channel()
  31.  
  32. * - Flags for SAM_Channel.
  33.  
  34. CHANNEL_ALL =    -1                    ;Search for first available channel.
  35. CHANNEL1 =    0                     ;Channel 1 (left speaker)
  36. CHANNEL2 =    1                     ;Channel 2 (right speaker)
  37. CHANNEL3 =    2                     ;Channel 3 (right speaker)
  38. CHANNEL4 =    3                     ;Channel 4 (left speaker)
  39.  
  40. * - Flags for SAM_Attrib.
  41.  
  42. SBIT8 =   $00000000                   ;Sound data is 8 bit.
  43. SBIT16 =  $00000001                   ;Sound data is 16 bit.
  44. SMODVOL = $00000002                   ;Modulate volume with next channel.
  45. SMODPER = $00000004                   ;Modulate period with next channel.
  46. SREPEAT = $00000008                   ;Repeat sample forever.
  47. SEMPTY =  $00000010                   ;Only play if channel is empty.
  48.  
  49. B_SMODVOL =    1
  50. B_SMODPER =    2
  51. B_SREPEAT =    3
  52. B_SEMPTY =    4
  53.  
  54. * --- Octave definitions for SAM_Octave.  An 'S' at the end of an octave
  55. *     definition indicates a sharp note.  The comments on the right tell
  56. *     you the period resulting from the octant used.  This is good if
  57. *     you are converting an old program that programmed the periods
  58. *     directly.
  59.  
  60. OCT_G0S    =    0    ;068
  61. OCT_G0    =    2    ;072
  62. OCT_F0S    =    4    ;076
  63. OCT_F0    =    6    ;080
  64. OCT_E0    =    8    ;085
  65. OCT_D0S    =    10    ;090
  66. OCT_D0    =    12    ;095
  67. OCT_C0S    =    14    ;101
  68. OCT_C0 =    16    ;107
  69. OCT_B0    =    18    ;113
  70. OCT_A0S    =    20    ;120
  71. OCT_A0    =    22    ;127
  72.  
  73. OCT_G1S    =    24    ;135
  74. OCT_G1    =    26    ;143
  75. OCT_F1S    =    28    ;151
  76. OCT_F1    =    30    ;160
  77. OCT_E1    =    32    ;170
  78. OCT_D1S    =    34    ;180
  79. OCT_D1    =    36    ;190
  80. OCT_C1S    =    38    ;202
  81. OCT_C1    =    40    ;214
  82. OCT_B1    =    42    ;226
  83. OCT_A1S    =    44    ;240
  84. OCT_A1    =    46    ;254
  85.  
  86. OCT_G2S    =    48    ;269
  87. OCT_G2    =    50    ;285
  88. OCT_F2S    =    52    ;302
  89. OCT_F2    =    54    ;320
  90. OCT_E2    =    56    ;339
  91. OCT_D2S    =    58    ;360
  92. OCT_D2    =    60    ;381
  93. OCT_C2S    =    62    ;404
  94. OCT_C2    =    64    ;428
  95. OCT_B2    =    66    ;453
  96. OCT_A2S    =    68    ;480
  97. OCT_A2    =    70    ;508
  98.  
  99. OCT_G3S    =    72    ;538
  100. OCT_G3    =    74    ;570
  101. OCT_F3S    =    76    ;604
  102. OCT_F3    =    78    ;640
  103. OCT_E3    =    80    ;678
  104. OCT_D3S    =    82    ;720
  105. OCT_D3    =    84    ;762
  106. OCT_C3S    =    86    ;808
  107. OCT_C3    =    88    ;856
  108. OCT_B3    =    90    ;906
  109. OCT_A3S    =    92    ;960
  110. OCT_A3    =    94    ;1016
  111.  
  112. OCT_G4S =    96    ;1076
  113. OCT_G4 =    98    ;1140
  114. OCT_F4S =    100    ;1208
  115. OCT_F4 =    102    ;1280
  116. OCT_E4 =    104    ;1356
  117. OCT_D4S =    106    ;1440
  118. OCT_D4 =    108    ;1524
  119. OCT_C4S =    110    ;1616
  120. OCT_C4 =    112    ;1712
  121. OCT_B4 =    114    ;1812
  122. OCT_A4S =    116    ;1920
  123. OCT_A4 =    118    ;2032
  124.  
  125. OCT_G5S =    120    ;2152
  126. OCT_G5 =    122    ;2280
  127. OCT_F5S =    124    ;2416
  128. OCT_F5 =    126    ;2560
  129. OCT_E5 =    128    ;2712
  130. OCT_D5S =    130    ;2880
  131. OCT_D5 =    132    ;3048
  132. OCT_C5S =    134    ;3232
  133. OCT_C5 =    136    ;3424
  134. OCT_B5 =    138    ;3624
  135. OCT_A5S =    140    ;3840
  136. OCT_A5 =    142    ;4064
  137.  
  138. OCT_G6S =    144    ;4304
  139. OCT_G6 =    146    ;4560
  140. OCT_F6S =    148    ;4832
  141. OCT_F6 =    150    ;5120
  142. OCT_E6 =    152    ;5424
  143. OCT_D6S =    154    ;5760
  144. OCT_D6 =    156    ;6096
  145. OCT_C6S =    158    ;6464
  146. OCT_C6 =    160    ;6848
  147. OCT_B6 =    162    ;7248
  148. OCT_A6S =    164    ;7680
  149. OCT_A6 =    166    ;8128
  150.  
  151. OCT_G7S =    168    ;8608
  152. OCT_G7 =    170    ;9120
  153. OCT_F7S =    172    ;9664
  154. OCT_F7 =    174    ;10240
  155. OCT_E7 =    176    ;10848
  156. OCT_D7S =    178    ;11520
  157. OCT_D7 =    180    ;12192
  158. OCT_C7S =    182    ;12928
  159. OCT_C7 =    184    ;13696
  160. OCT_B7 =    186    ;14496
  161. OCT_A7S =    188    ;15360
  162.  
  163.     ENDC    ;GMS_SOUND_I
  164.